<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>コントロールパネル</title>

    <link href="./assets/styles/default.css" rel="stylesheet" />
    <link href="./assets/styles/page/item_rank.css" rel="stylesheet" />
	<script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
	<script src="./assets/scripts/import.js" type="text/javascript"></script>
		<script type="text/javascript">
		$(function(){
			back_to_search();
			categoryModal({url:"{{'Home/Category/index'|U}}?keepThis=true&parent=3&TB_iframe=true&height=500&width=300&modal=false",mode:"tree"});
			
			$('#category').change(function(){	
			var value =	$(this).children('option:selected').val();
                document.form1.mode.value = "select";
                document.form1.category.value = value;
                document.form1.submit();    			
			});
		});
		</script>
</head>
<body>
{{$zhead}}
<div id="container">	
{{$zmenu}}
    <article>
    	<h2><span>&nbsp;</span>商品管理<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
		      <li><a href="{{'Home/Item/index'|U}}"><span>商品検索</span></a></li>
              <li><a href="{{'Home/Item/insert'|U}}"><span>商品登録</span></a></li>
              <li><a href="{{'Home/Item/rank'|U}}"><span>ランキング</span></a></li>
              <li  class="active"><a href="{{'Home/Item/set'|U}}"><span>基本設定</span></a></li>
			</ul>
        </nav>

		<section id="content">

        	<h3>基本設定</h3>
			<p class="message">内容を確認し、更新ボタンをクリックしてください。</p>

				<form name="form1" action="{{'Home/Item/set'|U}}" method="get" enctype="multipart/form-data">
                    <input type="hidden" name="id" value="{{$forms.id}}"/>
					<input type="hidden" name="company" value="0">
					<h4><span>&nbsp;</span>基本情報</h4>
					<table class="formTable">
						<tbody>
							<tr>
								<th class="must1">コンテンツ名</th>
								<td>
									<input type="text" name="content" class="text" value="{{$forms.content}}">{{$res}}
								</td>
								
							</tr>
							<tr class="odd">
								<th class="must1">カテゴリ設定</th>
								<td>
									<select name="category" id="category">
										  {{html_options options=$dao_categorygood selected=$forms.category}}
									</select>{{$res1}}
								</td>
							</tr>
							<!--
							<tr>
								<th class="must1">企業設定</th>
								<td>
									<input type="button" id="id_category" class="btn_category" value="カテゴリ選択">
									<input type="hidden" name="company">{{$res2}}
									<ul id="selected_category">
								   </ul>
								</td>
							</tr>
							-->
							<tr class="odd">
								<th>トップページ表示件数</th>
								<td>
									<ul>
										<li><input type="text" name="homepnumber1" class="smartspinner" value="{{$forms.homepnumber1}}">件 </li>{{$res3}}
										<li><input type="text" name="homepnumber2" class="smartspinner" value="{{$forms.homepnumber2}}">件 </li>{{$res3}}
										<li><input type="text" name="homepnumber3" class="smartspinner" value="{{$forms.homepnumber3}}">件  </li>{{$res3}}
									</ul>
								</td>
							</tr>
							<tr>
								<th>トップページ表示項目</th>
                                 <td>
								 {{ foreach from=$hg_nu key=kk item=vv name="member" }}
							    <label><input type="checkbox" name="{{$vv}}"  {{if $forms[$vv] == 1 }} checked="true" {{/if}} value="1" />{{ $hg_na[$kk] }}</label>
						         {{ /foreach }}
						         </td>
							</tr>
							<tr class="odd">
								<th>一覧ページ表示件数</th>
								<td>
									<input type="text" name="listnumber" class="smartspinner" value="{{$forms.listnumber}}">件単位
							</tr>
							<tr>
								<th>一覧ページ表示項目</th>
								<td>
							     {{ foreach from=$lg_nu key=kk item=vv name="member" }}
							    <label><input type="checkbox" name="{{$vv}}"  {{if $forms[$vv] == 1 }} checked="true" {{/if}} value="1" />{{ $lg_na[$kk] }}</label>
						         {{ /foreach }}
								</td>
							</tr>
							<tr class="odd">
								<th>表示順</th>
								<td>
								{{html_radios name="orderby" options=$set_order checked=$forms.orderby"}}
								</td>
							</tr>
						</tbody>
					</table>

					<p class="button">
						<button type="submit" class="submit"><span>更新</span></button>
					</p>
					<input type="hidden" name="mode" value="update">
				</form>
			</section>
	</article>
</div>
{{$zfooter}}
</body>
</html>